from pydantic import BaseModel, ConfigDict
from core.data_types import DatetimeStr
from apps.vadmin.auth.schemas import UserSimpleOut

class Task(BaseModel):
    status: str
    start_time: DatetimeStr | None = None
    end_time: DatetimeStr | None = None
    create_user_id: int | None = None

class TaskSimpleOut(Task):
    model_config = ConfigDict(from_attributes=True)
    
    id: int
    update_datetime: DatetimeStr
    create_datetime: DatetimeStr

class TaskListOut(TaskSimpleOut):
    model_config = ConfigDict(from_attributes=True)

    create_user: UserSimpleOut 
